<html>
<head>
<title>Documento sem t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<?PHP 
include("config.php");
 ?>
 <?PHP include("config.php");
require_once "sql_inject.php"; 
$bDestroy_session = TRUE; 
$url_redirect = 'index.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 
require 'config.php';
?>
<script language="JavaScript">
 function blockError(){return true;}
 window.onerror = blockError;
 </script>
<script language=JavaScript>
 function disableselect(e) {
    return false
 } 
 function reEnable() {
    return true
 }
 //if IE4+
 document.onselectstart=new Function ("return false")
 //if NS6
 if (window.sidebar) { 
    document.onmousedown=disableselect
    document.onclick=reEnable
 }
 </script>
<SCRIPT language=JavaScript>
<!--

var message="Gosto do site né safado! ta querendo copiar o que?";


function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</SCRIPT>
<body bgcolor="#000000">
<center>
<br>
<br>
<br>
<table width="428" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="428" height="181" valign="top">
	<?PHP 
include("config.php");
 ?><?php

// I use above file for security to provide below
//----------------------------------------------
$conn=mssql_connect($dbhost,$dbuser,$dbpasswd);
$selected=mssql_select_db('MuOnline', $conn);

$query = 'Select Name,AccountID From Character WHERE Ctlcode > 2';
$result = mssql_query( $query );

// This is pretty much your layout

echo '<center><table align=center>';
echo '<center><tr><center>
<td><center><b><font face=Arial size=4 color=#FFFFFF>GM/ADM</font></center></td>
<td><b><font face=Arial size=4 color=#FFFFFF><center>Status</center>';

$waw = mssql_query("SELECT count(*) From Character where CtlCode=8");
$xex = mssql_result($waw, 0, 0);

// For Top 100 or whatever you wish just change below
//$i<mssql_num_rows($result) to $i < 100
for($i=0;$i < $xex;++$i)
{
$row = mssql_fetch_row($result);

$query1 = "select ConnectStat,ConnectTM,DisConnectTM,IP from MEMB_STAT WHERE memb___id='$row[1]'";
$result1 = mssql_query( $query1 );
$row1 = mssql_fetch_row($result1);
if ($row1[0] == 1) {
$status = '<img title="Administrador esta Online" border="0" src="Images/online.gif" width="16" height="16">';
$ccc = 'green';

$sql_pw_check = mssql_query("select GameIDC from AccountCharacter WHERE GameIDC='$row[0]'");
$pw_check = mssql_num_rows($sql_pw_check);

}
if (($row1[0] == 0) || ($pw_check <= 0)) {
$status = '<img title="Administrador esta Offline" border="0" src="Images/offline.gif" width="16" height="16">';
$ccc = 'red';
}
echo '<tr><center><td width=100><center><font face=Arial size=3 color=#FFFFFF>';
echo "<center><b><font color=$color>$row[0]";
echo '</font></center></td><td width=100><center><FONT SIZE=1 face=Arial color=#FFFFFF>';
echo "<center><b><font color=$ccc>$status";
echo '</font></td>';
}
echo '</table>';

echo '</body>';
echo '</html>';

$conn=mssql_close();
?>&nbsp;</td>
  </tr>
</table></center>
</body>
</html>
